<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
	<head>
		<base href="<%=basePath%>">
		<meta charset="utf-8" />
		<title></title>
		<meta name="description" content="overview & stats" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<link href="static/css/bootstrap.min.css" rel="stylesheet" />
		<link href="static/css/bootstrap-responsive.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="static/css/font-awesome.min.css" />
		<!-- 下拉框 -->
		<link rel="stylesheet" href="static/css/chosen.css" />
		
		<link rel="stylesheet" href="static/css/ace.min.css" />
		<link rel="stylesheet" href="static/css/ace-responsive.min.css" />
		<link rel="stylesheet" href="static/css/ace-skins.min.css" />
		
		<link rel="stylesheet" href="static/css/datepicker.css" /><!-- 日期框 -->
		<script type="text/javascript" src="static/js/jquery-1.7.2.js"></script>
		<script type="text/javascript" src="static/js/jquery.tips.js"></script>
		
<script type="text/javascript">
	
   
	//保存
	function save(){
			if($("#DEPARTMENTNAME_ID").val()==""){
			$("#DEPARTMENTNAME_ID").tips({
				side:3,
	            msg:'请输入院系名称',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#DEPARTMENTNAME_ID").focus();
			return false;
		}
		if($("#BENORZHAUN").val()==""){
			$("#BENORZHAUN").tips({
				side:3,
	            msg:'请输入本/专',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#BENORZHAUN").focus();
			return false;
		}
		if($("#GRADUATIONTIME").val()==""){
			$("#GRADUATIONTIME").tips({
				side:3,
	            msg:'请输入毕业时间(届)',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#GRADUATIONTIME").focus();
			return false;
		}
		if($("#TOPICSTARTTIME").val()==""){
			$("#TOPICSTARTTIME").tips({
				side:3,
	            msg:'请输入选题开始时间',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#TOPICSTARTTIME").focus();
			return false;
		}
		
		if($("#TOPICENDTIME").val()==""){
			$("#TOPICENDTIME").tips({
				side:3,
	            msg:'请输入选题结束时间',
	            bg:'#AE81FF',
	            time:2
	        });
			
			$("#TOPICENDTIME").focus();
			return false;
		}else if($("#TOPICENDTIME").val()<$("#TOPICSTARTTIME").val()){
			$("#TOPICENDTIME").tips({
				side:3,
	            msg:'输入时间比开始时间小',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#TOPICENDTIME").focus();
			return false;
		}
		
		if($("#STARTSETTING").val()==""){
			$("#STARTSETTING").tips({
				side:3,
	            msg:'请输入启动设置',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#STARTSETTING").focus();
			return false;
		}
		$("#Form").submit();
		$("#zhongxin").hide();
		$("#zhongxin2").show();
	}
	
</script>

 <script language="javascript" type="text/javascript" src="plugins/my97date/wdatepicker.js"></script>

	</head>
<body >
	<form action="topictime/${msg}.do" name="Form" id="Form" method="post">
		<input type="hidden" name="TOPICTIME_ID" id="TOPICTIME_ID" value="${pd.TOPICTIME_ID}"/>
		<div id="zhongxin">
		<table id="table_report" class="table table-striped table-bordered table-hover">
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">院系名称:</td>
				<td><select <%--class="chzn-select"--%> style="width:300px" name="DEPARTMENTNAME_ID" id="DEPARTMENTNAME_ID" value="${pd.DEPARTMENTNAME_ID}" data-placeholder="院系名称">
						<option value="">请选择</option>
						<c:forEach items="${roleList}" var="role">
							<option value="${role.ZD_ID }" <c:if test="${role.ZD_ID == pd.DEPARTMENTNAME_ID }">selected</c:if>>${role.NAME }</option>
						</c:forEach>
					</select></td>
				</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">本/专:</td>
				<td style="height:35px;padding-top: 13px;"  >&nbsp;&nbsp;&nbsp;&nbsp;
					<input name="BENORZHAUN" type="radio" value="专科" checked/><span class="lbl">专科</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<input name="BENORZHAUN" type="radio" value="本科" <c:if test="${'本科' == pd.BENORZHAUN }">checked="checked"</c:if>/><span class="lbl">本科</span>
				</td>
				<!--  <td><input type="text" name="BENORZHAUN" id="BENORZHAUN" value="${pd.BENORZHAUN}" maxlength="32" placeholder="这里输入本/专" title="本/专"/></td>
			-->
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">毕业时间(届):</td>
				<td><select <%--class="chzn-select"--%> style="width:300px" name="GRADUATIONTIME" id="GRADUATIONTIME" value="${pd.GRADUATIONTIME}" data-placeholder="毕业时间">
						
						<c:forEach items="${roleTime}" var="rol">
							<option value="${rol.NAME }" <c:if test="${role.NAME == pd.GRADUATIONTIME }">selected</c:if>>${rol.NAME }</option>
						</c:forEach>
					</select>
				<!--  <input type="text" name="GRADUATIONTIME" id="GRADUATIONTIME" value="${pd.GRADUATIONTIME}" maxlength="32" placeholder="这里输入毕业时间(届)" title="毕业时间(届)"/>--></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">选题开始时间:</td>
				<td>
				 <input type="text" name='TOPICSTARTTIME' class="Wdate" id="TOPICSTARTTIME" pattern='datetime' alt='' onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" onblur="FireEvent(this,'onchange')" value="${pd.TOPICSTARTTIME}"/>
				 <!-- <input class="span10 date-picker" name="TOPICSTARTTIME" id="TOPICSTARTTIME" value="${pd.TOPICSTARTTIME}" type="text" data-date-format="yyyy-mm-dd " readonly="readonly" placeholder="选题开始时间" title="选题开始时间"/>
				 -->
					</td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">选题结束时间:</td>
				<td>
				 <input type="text" name='TOPICENDTIME' class="Wdate" id="TOPICENDTIME" pattern='datetime' alt='' onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" onblur="FireEvent(this,'onchange')" value="${pd.TOPICENDTIME}"/>
				<!-- <input class="span10 date-picker" name="TOPICENDTIME" id="TOPICENDTIME" value="${pd.TOPICENDTIME}" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" placeholder="选题结束时间" title="选题结束时间"/> --></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">启动设置:</td>
				<td style="height:35px;padding-top: 13px;" >&nbsp;&nbsp;&nbsp;&nbsp;
					<input name="STARTSETTING" type="radio" value="启用" checked/><span class="lbl">启用</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<input name="STARTSETTING" type="radio" value="不启用" <c:if test="${'不启用' == pd.STARTSETTING }">checked</c:if> /><span class="lbl">不启用</span>
				</td>
				<!-- <td><input type="text" name="STARTSETTING" id="STARTSETTING" value="${pd.STARTSETTING}" maxlength="32" placeholder="这里输入启动设置" title="启动设置"/></td>
			 -->
			</tr>
			<tr>
				<td style="text-align: center;" colspan="10">
					<a class="btn btn-mini btn-primary" onclick="save();">保存</a>
					<a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a>
				</td>
			</tr>
		</table>
		</div>
		
		<div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div>
		
	</form>
	
	
		<!-- 引入 -->
		<script type="text/javascript">window.jQuery || document.write("<script src='static/js/jquery-1.9.1.min.js'>\x3C/script>");</script>
		<script src="static/js/bootstrap.min.js"></script>
		<script src="static/js/ace-elements.min.js"></script>
		<script src="static/js/ace.min.js"></script>
		<script type="text/javascript" src="static/js/chosen.jquery.min.js"></script><!-- 下拉框 -->
		<script type="text/javascript" src="static/js/bootstrap-datepicker.min.js"></script><!-- 日期框 -->
		<script type="text/javascript">
		$(top.hangge());
		$(function() {
			
			//单选框
			$(".chzn-select").chosen(); 
			$(".chzn-select-deselect").chosen({allow_single_deselect:true}); 
			
			//日期框
			$('.date-picker').datepicker();
			
		});
		
		</script>
</body>
</html>